import { SET_LOGIN_STATUS, SET_PATHNAME } from './action_types';

const defaultState = {
  loginState: false,
  pathname: ''
};

export default (state = defaultState, action) => {
  const { type, status, pathname } = action;
  switch (type) {
    case SET_LOGIN_STATUS:
      return { ...state, loginState: status };
    case SET_PATHNAME:
      return {...state, pathname}
    default:
      return state;
  }
}
